#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include "datastore.h"
#include "modelfile.h"
#include "yctablemodel.h"
#include "yxaddtablemodel.h"
#include "yxtablemodel.h"
#include "yxtabledelegate.h"
#include "yxaddtabledelegate.h"
#include "yctabledelegate.h"
#include "listmodel.h"

#include <QMainWindow>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private slots:
    void on_insert1_clicked();

    void on_delete1_clicked();

    void on_insert2_clicked();

    void on_delete2_clicked();

    void on_tableView_clicked(const QModelIndex &index);

    void on_listView_clicked(const QModelIndex &index);

    void on_listView_doubleClicked(const QModelIndex &index);

private:
    Ui::MainWindow *ui;
    QVector<Model> model;
    YXTableModel* yxModel;
    YXAddTableModel* yxAddModel;
    YCTableModel* ycModel;
    NullModel* nullModel;

    YXTableDelegate* yxdelegate;
    YXAddTableDelegate* addelegate;
    YCTableDelegate* ycdelegate;

    ListModel* list;
};

#endif // MAINWINDOW_H
